hello world this is a test
For this project I made a program that keeps quiz scores. I made a loop that the user uses to enters the scores into a array of 20 ints. Then in an another loop I found the highest score of all the quizzes and outputted it to the screen.
In my vector project I made a vector of strings. Then in a for loop I set all the string to what ever I wanted them to be and then I outputted all the strings to the screen in another for loop.
In my project 2 for section 5 I created a game that plays hangman.
I first made an array of strings and set each element to a different word.
I then selected a word at random to be the word to be guessed and also made a
string the same length as the word to be guess but set each letter to a *.
then in a for loop I asked the user to enter in a letter. Inside that loop
I had another loop that went though each letter in the word that was to be
guess and checked to see if the letter entered by the user was in the word.
If so, I would go to the string set to * and change the letter/s guessed
correctly to the real letter. For example:
word is Frodo.
user sees *****
user guesses d.
user now sees ***d*.
user guesses o.
user now sees **odo. ect.
In my video six project I had to make a game where the user guesses a letter in an array of ints. I used the rand() function to get a random letter from my array.Then using a linear search I checked to see if the number guessed was in my array of ints. if so,I outputted congrats you win!